1. Field of the Invention
The present invention relates to a packet receiving apparatus that verifies reassembled packets, and a processing method for the same.
2. Description of the Related Art
As protocols for communication networks, protocols such as TCP/IP and UDP/IP are used. TCP/IP is an abbreviation for Transmission Control Protocol/Internet Protocol, and UDP/IP is an abbreviation for User Datagram Protocol/Internet Protocol.
In networks using such protocols, the total length of one packet at the IP layer can be defined as up to 65535 octets (1 octet=8 bits) according to specifications. However, at the data link layer below the IP layer, for example in IEEE 802.3, the maximum transfer unit that can be transmitted as one packet is limited to 1492 octets. The maximum transfer unit will hereinafter be referred to as the MTU (Maximum Transfer Unit).
Different lengths of MTUs are employed depending on the data link layer, such as 1500 octets for Ethernet (R), 576 octets for dial-up connections via telephone lines, and 4352 octets for Fibre Channel.
In a case such as where the packet length handled at the IP layer is longer than the MTU at the data link layer, or where a packet is to be transferred to a network with the MTU smaller than the MTU of the current network, the original IP packet needs to be divided before being passed to the data link layer. The mechanism of this dividing is known as IP fragmentation.
Japanese Patent Laid-Open No. 05-327771 discloses a technique of transferring packets to a certain destination without packet overlaps by indicating to a transfer circuit a packet descriptor that represents information on storage locations of fragment packets.
Japanese Patent Laid-Open No. 2007-215013 discloses a technique of switching between checksum calculation methods depending on whether or not fragment packets have sequentially arrived in order without overlaps.
However, the above conventional IP fragmentation processing methods have had a problem as follows. While TCP/UDP, ICMP, and the like are used as upper protocols for an IP packet before being fragmented, these protocols have a checksum field as header information. The validity of the packet in question is determined based on the consistency of a checksum.
To calculate this checksum, it is necessary to calculate the 1's complement sum of every 2 octets, that is, the Internet checksum defined in RFC 1071, for the following: an IP pseudo header made of part of the IP header; the TCP (UDP) header; and the payload. For this purpose, the calculation is performed by again reading out header/payload information from memory in which reassembly has been performed.
In addition, the reassembly of fragments undergoes a process in which all received fragment packets are temporarily accumulated and reordered before being reassembled into a datagram. Therefore, the reception performance decreases in a network in which IP fragment packets occur, and this has been another problem.